/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.execute.controller;

import com.icinfo.cloud.provider.punish.execute.dto.ExecuteCluHandoutRecordDto;
import com.icinfo.cloud.provider.punish.execute.service.IExecuteCluHandoutRecordService;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.web.BaseController;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 描述: 裁执分离指派记录表 execute_clu_handout_record 对应的Controller类.<br>
 *
 * @author framework generator
 * @date 2022年08月26日
 */
@RestController
@RequestMapping("/execute/cluHandoutRecord")
public class ExecuteCluHandoutRecordController extends BaseController {
    /**
     * 日志记录器
     */
    private static final Logger logger = LoggerFactory.getLogger(ExecuteCluHandoutRecordController.class);

    @Autowired
    private IExecuteCluHandoutRecordService executeCluHandoutRecordService;


    /**
     * 描述: 裁执分离指派保存
     *
     * @param executeCluHandoutRecordDto
     * @return com.icinfo.framework.common.web.Result
     * @author zhanghongqiang
     * @Date 2022/8/29
     */
    @PostMapping("/addExecuteAppoint")
    @ApiOperation(value = "裁执分离指派保存", httpMethod = "POST")
    public Result<String> addExecuteAppoint(@RequestBody @Validated ExecuteCluHandoutRecordDto executeCluHandoutRecordDto) {
        executeCluHandoutRecordService.saveExecuteAppoint(executeCluHandoutRecordDto);
        return Result.success("新增指派成功");
    }
}